package org.travel.api.travel.controller.Lxf;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.travel.api.travel.dao.Lxf.hotelDao;
import org.travel.api.travel.pojo.Hotel;

import java.util.List;

@RestController
@RequestMapping("/hotel")
@CrossOrigin("*")
public class hotelController {

    @Autowired
    private hotelDao hotelDao;

    @RequestMapping("/getbycityid")
    public List<Hotel> gethotelbycityid(int id){
        return hotelDao.getAllByCityId(id);
    }


}
